<!DOCTYPE html>
<html lang="en"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>修改密码</title>
    
    
    <meta content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" name="viewport">
    <meta content="yes" name="apple-mobile-web-app-capable">
    <meta content="black" name="apple-mobile-web-app-status-bar-style">
    <meta content="telephone=no" name="format-detection">
    <link rel="stylesheet" href="bitStyle/skin/main.css">
    <script src="bitStyle/skin/jquery-1.10.2.min.js"></script>
    <script src="bitStyle/skin/layer.js"></script><link rel="stylesheet" href="bitStyle/skin/layer.css" id="layui_layer_skinlayercss" style="">
    <script src="bitStyle/skin/foundation.js"></script>
    <script src="bitStyle/skin/my.js"></script>
    
<script>
    $(function () {
        $('.checkbox-icon').on('click', '', function () {
            $(this).toggleClass('sel');
        })
        $('input').on('focus', function () {
            $(this).closest('div').css('border-color', '#20ac19');
        }).on('blur', function () {
            var $this = $(this);
            $this.closest('div').css('border-color', '#d1d1d1');
            setTimeout(function () { $this.closest('div').removeAttr('style'); }, 500);
        })
    });

    //提交数据
    function SubmitUpdatePassword() {
        var oldpsd = $('#Oldpsd').val();
        if (!isPwd(oldpsd)) {
            layer.msg("密码长度需在6-16位之间");
            $('#Oldpsd').focus();
            return;
        }

        var newpsd = $('#Newpsd').val();
        if (!isPwd(newpsd)) {
            layer.msg("密码长度需在6-16位之间");
            $('#Newpsd').focus();
            return;
        }

        var repsd = $('#Repsd').val();
        if (!isPwd(repsd)) {
            layer.msg("密码长度需在6-16位之间");
            $('#Repsd').focus();
            return;
        }

        if (oldpsd == newpsd) {
            layer.msg("新密码与旧密码不能相同");
            $('#Newpsd').focus();
            return;
        }

        if (newpsd != repsd) {
            layer.msg("确认密码和新密码不一致");
            $('#Repsd').focus();
            return;
        }


        var url = "/home/rmq/resetpassword.html";
        var param = {
            ymm: oldpsd,
            xmm: newpsd,
            xmmqr: repsd
        };
        var j = layer.load(2);
        $.post(url, param, function (data) {
                layer.close(j);
                if (data.sf == 1) {
                    /*if(data.reLogin == true){
                        layer.msg(data.Message, function () {
                            window.location.href ="/home/rmq/index.html";
                        });
                    }*/
                    layer.msg(data.nr, function () {
                        window.location.href ="/home/rmq/index.html";
                    });
                } else {
                    layer.msg(data.nr);
                }
        });
    }

</script>

</head>
<body style="">
    
<div class="wrapper">
    <script>
    function back(){
        window.history.back();
    }
</script>
<style>
    .wrapper .mystyle{background-color:#6AA84F;text-align: center;font-weight: bold; color: #ffffff;
        padding: .4rem 3%; width: 94%; }
    .wrapper .mystyle img{float: left;  height: 100%; }
    .wrapper .notice,.article ,.joinfb,.w33,.my-friend001,.ljjcjj,.pt20,.swiper-container,.myforget,.myreg{margin-top: 1.8rem;}

    .weixin-set,.ewm{margin-top: 2.6rem;}
    .my-money001{margin-top: 2.2rem;}

</style>
<div class="header mystyle"><img onclick="back();" src="bitStyle/skin/back.png">人脉圈</div>

    <div class="main change-password ljjcjj">
        <div class="form-list">
            <div class="form-input">
                <span class="input-hint">原始密码</span>
                <input type="password" placeholder="请输入原始密码" id="Oldpsd" maxlength="16">
            </div>
            <div class="form-input">
                <span class="input-hint">新密码</span>
                <input type="password" placeholder="请输入新密码" id="Newpsd" maxlength="16">
            </div>
            <div class="form-input">
                <span class="input-hint">确认密码</span>
                <input type="password" placeholder="请确认密码" id="Repsd" maxlength="16">
            </div>
            <input class="submit-f-btn mt20" type="submit" value="确认" onclick="SubmitUpdatePassword();">
        </div>
    </div>
</div>




</body></html>